package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.provider.api.model.query.AgentMemberQuery;
import com.weixing.mall.provider.api.model.vo.AgentMemberAddressVo;
import com.weixing.mall.provider.model.domain.DeliveryAddress;
import com.weixing.mall.provider.model.query.DeliveryAddressPCQuery;
import com.weixing.mall.provider.model.vo.DeliverAddressPCVo;
import com.weixing.mall.provider.api.model.vo.DeliveryAddressVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 会员模块-收货地址表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-13
 */
public interface DeliveryAddressMapper extends BaseMapper<DeliveryAddress> {

    IPage<DeliverAddressPCVo> selectListPC(@Param("pg") Page page, @Param("qs") DeliveryAddressPCQuery deliveryAddressPCQuery);

    IPage<AgentMemberAddressVo> selectAgentMemberAddressOfPage(@Param("pg") Page page, @Param("qs") AgentMemberQuery agentMemberQuery);
    List<DeliveryAddressVo> selectByMemberIdList(Long memberId);

    IPage<DeliverAddressPCVo> selectByMemberIdOfPage(@Param("pg")Page page,  @Param("memberId")Long memberId);

    void updateIsDefault(@Param("mid")Long mid, @Param("state")Integer state);
}
